package com.xpmusic.model;

import java.util.Objects;

public class MusicInfo {
    private int id;
    private String musicName;
    private String musicInfo;
    private String musicPath;
    private String musicPic;
    private String singer;

    public MusicInfo() {
    }
    
    public MusicInfo(String musicName, String musicPath) {
        this.musicName = musicName;
        this.musicPath = musicPath;
    }
    
    public MusicInfo(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMusicName() {
        return musicName;
    }

    public void setMusicName(String musicName) {
        this.musicName = musicName;
    }

    public String getMusicInfo() {
        return musicInfo;
    }

    public void setMusicInfo(String musicInfo) {
        this.musicInfo = musicInfo;
    }

    public String getMusicPath() {
        return musicPath;
    }

    public void setMusicPath(String musicPath) {
        this.musicPath = musicPath;
    }

    public String getMusicPic() {
        return musicPic;
    }

    public void setMusicPic(String musicPic) {
        this.musicPic = musicPic;
    }

    public String getSinger() {
        return singer;
    }

    public void setSinger(String singer) {
        this.singer = singer;
    }

    @Override
    public String toString() {
        return "MusicInfo{" +
                "id=" + id +
                ", musicName='" + musicName + '\'' +
                ", musicInfo='" + musicInfo + '\'' +
                ", musicPath='" + musicPath + '\'' +
                ", musicPic='" + musicPic + '\'' +
                ", singer='" + singer + '\'' +
                '}';
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MusicInfo musicInfo = (MusicInfo) o;
        return Objects.equals(musicName, musicInfo.musicName) &&
                Objects.equals(musicPath, musicInfo.musicPath);
    }
    
    @Override
    public int hashCode() {
        
        return Objects.hash(musicName, musicPath);
    }
}
